package graph;

/*
 * @authors: Clayson Celes and Andrey Bicalho
 * 05 out 2011
 */
public class Vertex {
	
	private Point coordinates;
	
	public Vertex(int row, int col){
		coordinates = new Point(row, col);
	}
	
	public int getRow(){
		return coordinates.getX();
	}
	
	public int getCol(){
		return coordinates.getY();
	}
	
	public Point getCoordinates(){
		return coordinates;
	}
	
	@Override
	public String toString(){
		String myString = "\nx:" + coordinates.getX() + ", y: "+ coordinates.getY();
		return myString;
	}
	
    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false; 
          }
        if (!(obj instanceof Vertex)) { 
            return false;
        }
        final Vertex other = (Vertex) obj;
        if(this.coordinates.getX()==other.coordinates.getX() && this.coordinates.getY()==other.coordinates.getY()){
        	return true;
        }else{
        	return false;
        }
    }
    
    @Override
    public int hashCode() {
          return 0;
    }
	    
}
